#ifndef APPLICATION_H_
#define APPLICATION_H_

#include <Ogre.h>
#include <OIS/OIS.h>
#include <CEGUI/CEGUI.h>
#include <OgreCEGUIRenderer.h>
#include "ExitListener.h"
#include "AnimationListener.h"

class Application
{
	public:
		Application();
		void go();
		virtual ~Application();

	private:
		Ogre::Root *mRoot;
		OIS::Keyboard *mKeyboard;
		OIS::InputManager *mInputManager;
		CEGUI::OgreCEGUIRenderer *mRenderer;
		CEGUI::System *mSystem;
		ExitListener *mListener;
		Ogre::AnimationState *mAnimationState;
		AnimationListener *mAnimationListener;
		Ogre::Entity* mEnt;
		Ogre::SceneNode* knightNode;

		void createRoot();
		void defineResources();
		void setupRenderSystem();
		void createRenderWindow();
		void initializeResourceGroups();
		void setupScene();
		void setupInputSystem();
		void setupCEGUI();
		void createFrameListener();
		void startRenderLoop();
};

#endif /* APPLICATION_H_ */
